﻿@model IEnumerable<OpenWeb.Dal.Models.Contact>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.IsCustomer)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.IsPerson)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ContactType)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Pref)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Surname)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Description)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Notes)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Email)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Tel1)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Tel2)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Cell)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Fax)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.WebSite)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DateCreation)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Guid)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.IsDeleted)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.IsCustomer)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.IsPerson)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ContactType)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Pref)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Surname)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Description)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Notes)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Email)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Tel1)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Tel2)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Cell)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Fax)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.WebSite)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DateCreation)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Guid)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.IsDeleted)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ID }) |
            @Html.ActionLink("Details", "Details", new { id=item.ID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ID })
        </td>
    </tr>
}

</table>
